package com.pig4cloud.pigx.contract.open.api.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import com.pig4cloud.pigx.contract.annotation.SetScaleMainCurrency;
import com.pig4cloud.pigx.contract.annotation.SetScaleTokenCurrency;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 */
@Data
public class OpenApiTradeHistoryVOV1 {

	/**
	 * 币对名称
	 */
	private String symbolName;

	/**
	 * 成交时间
	 */
	private Long time;

	/**
	 * 订单类型（0市价单、1限价单、2强平单）
	 */
	@ApiModelProperty(value = "订单类型（0市价单、1限价单、2强平单）")
	private String orderType;

	/**
	 * 订单id
	 */
	@ApiModelProperty(value = "订单id")
	private Long orderId;

	/**
	 * 订单方向（0做多、1做空）
	 */
	@ApiModelProperty(value = "订单方向（0做多、1做空）")
	private String side;

	/**
	 * 操作类型（0开仓、1平仓）
	 */
	@ApiModelProperty(value = "操作类型（0开仓、1平仓）")
	private String operationType;

	/**
	 * 成交价格
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@ApiModelProperty(value = "成交价格")
	private BigDecimal price;

	/**
	 * 成交数量
	 */
	@SetScaleTokenCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@ApiModelProperty(value = "成交数量")
	private BigDecimal num;

	/**
	 * 交易面值
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@ApiModelProperty(value = "交易面值")
	private BigDecimal tradeValue;

	/**
	 * 倍数
	 */
	@ApiModelProperty(value = "倍数")
	private Integer multiple;

	/**
	 * 手续费
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@SetScaleMainCurrency
	@ApiModelProperty(value = "手续费")
	private BigDecimal handlingFee;

	/**
	 * 手续费率
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	@SetScaleMainCurrency(scale = 2)
	@ApiModelProperty(value = "手续费率")
	private BigDecimal handlingFeeRate;

}
